package com.inartea.curo.dao.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the application_rights database table.
 * 
 */
@Entity
@Table(name="application_rights")
public class ApplicationRight implements Serializable {
	private static final long serialVersionUID = 1L;
	private int id;
	private String descr;
	private String name;
	private List<UserProfile> userProfiles;

    public ApplicationRight() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}


	@Column(length=200)
	public String getDescr() {
		return this.descr;
	}

	public void setDescr(String descr) {
		this.descr = descr;
	}


	@Column(nullable=false, length=100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}


	//bi-directional many-to-many association to UserProfile
	@ManyToMany(mappedBy="applicationRights")
	public List<UserProfile> getUserProfiles() {
		return this.userProfiles;
	}

	public void setUserProfiles(List<UserProfile> userProfiles) {
		this.userProfiles = userProfiles;
	}
	
}